﻿using System;
using BrainTechLLC;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using BrainTechLLC.ThreadSafeObjects;

namespace Mud.EmlenMudMain
{
  public delegate string GetStringForCode(CharacterData ch, CharacterData looker, string shownIfCantSee, ShowFlags flags);

  [FlagsAttribute]
  public enum ShowFlags
  {
    None = 0,
    ShowNothingToThoseWhoCantSeeChr = 1,
    ShowNothingToThoseWhoCantSeeTarget = 1 << 1
  }

  public interface IStringCodeCollection
  {
    string AtSelf(CharacterData ch, CharacterData looker, string shownIfCantSee, ShowFlags flags);
    System.Text.StringBuilder CapFirstLetter(System.Text.StringBuilder sbWorkspace);
    string CharName(CharacterData ch, CharacterData looker, string shownIfCantSee, ShowFlags flags);
    void DisplayCodedStringTo(DisplaysTo displayTo, string szCodedString, CharacterData ch, CharacterData target, CharacterData chThird, System.Collections.Generic.List<CharacterData> rgTargets, string sCharNameIfLookerCantSee, string sTargetNameIfLookerCantSee);
    void DisplayCodedStringTo(DisplaysTo displayTo, System.Text.StringBuilder sb, CharacterData ch, CharacterData target, CharacterData chThird, System.Collections.Generic.List<CharacterData> rgTargets, string sCharNameIfLookerCantSee, string sTargetNameIfLookerCantSee);
    GetStringForCode HeSheItDelegate { get; set; }
    GetStringForCode HimHerItDelegate { get; set; }
    GetStringForCode HisHersItsDelegate { get; set; }
    bool IsShowFlagSet(DisplaysTo disp1, DisplaysTo disp2);
    GetStringForCode IsHisHersTheirsDelegate { get; set; }
    GetStringForCode SelfNounDelegate { get; set; }
    string Ownership(CharacterData ch, CharacterData looker, string shownIfCantSee, ShowFlags flags);
    string OwnershipAdjective(CharacterData ch, CharacterData looker, string shownIfCantSee, ShowFlags flags);
    string ReferenceTo(CharacterData ch, CharacterData looker, string shownIfCantSee, ShowFlags flags);
    ThreadSafeLookup<string, GetStringForCode> FunctionsForInterprettingTHIRDPERSONCodeStrings { get; set; }
    ThreadSafeLookup<string, GetStringForCode> FunctionsForInterprettingCHARACTERCodeStrings { get; set; }
    ThreadSafeLookup<string, string> SubstitutionsAndCodes { get; set; }
    GetStringForCode ShortNounDelegate { get; set; }
    ShowFlags ShowOptions { get; set; }
    ThreadSafeLookup<string, GetStringForCode> FunctionsForInterprettingTARGETCodeStrings { get; set; }
    bool this[ShowFlags flags] { get; set; }
    string YouHimHerIt(CharacterData ch, CharacterData looker, string shownIfCantSee, ShowFlags flags);
  }
  
}
